package com.lanxin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by cyh on 2021/3/4.
 */
@RestController
@RequestMapping("product")
public class ProductController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("listproduct")
    public String listproduct(){
        String str = restTemplate.getForObject("http://orderservice/order/listorder",String.class);
        return "listproduct "+str;
    }
}
